package com.lb.web;

import com.lb.data.TestData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @version 1.0
 * @Author: Edward
 * @Date: 2021/6/28 8:54
 * @Description:
 */
@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {
    @RequestMapping("/getDate")
    public TestData getDate() {
        TestData data = new TestData();
        data.setCreateTime(LocalDateTime.now());
        data.setUpdateTime(new Date());
        log.info("TestData: {}", data);
        return data;
    }
}
